import React, {Component} from 'react';
import "./my.module.less"

// 组件
import Nav from "./nav/nav";
import InfoCard from "./InfoCard/InfoCard";
import ListItem from "./ListItem/ListItem";
// js逻辑文件
import {GetLocalStorage} from '../../redux/LogicalOperation'

class My extends Component {
    state = {
        UserInfo: ""
    }

    constructor(props) {
        super(props);
    }

    // 初始化判断
    initJudge(){
        this.setState({
            UserInfo: GetLocalStorage('UserInfo')
        })
    }

    componentDidMount() {
        this.initJudge()
    }

    render() {
        return (
            <div>
                <Nav/>
                <InfoCard UserInfo={this.state.UserInfo}/>
                <ListItem/>
            </div>
        )
    }
}

export default My;